﻿@model IEnumerable<SelectListItem>
<div class="editor-label">
    Department
</div>
@Html.DropDownList("Departments", Model)

<div id="divSpec"></div>

<script>
    (function () {
        $("#Departments").change(function () {
            $("#divSpec").load("/User/GetSpecialities", this[this.selectedIndex].value);
        });
    })();

    $(document).ready(function () {
        $("#Departments").change();
    })
</script>
